Communication apparatus, control method thereof, and storage medium

ABSTRACT

An apparatus receives and analyzes a packet transmitted via a network, and performs network setting according to data included in the packet. Further, if it is determined that the received packet is a packet addressed to the apparatus and is not a setting packet for the network setting, the apparatus is controlled not to analyze the packet.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a communication apparatus that can beconnected to a network.

2. Description of the Related Art

Various conventional communication apparatuses have been widely knownthat are connected to networks such as a local area network (LAN) andthe Internet to communicate with external apparatuses on the networks.

A protocol widely used for the communication apparatus to be connectedto the network is an internet protocol. The internet protocol allocatesan address (internet protocol (IP) address) unique to each apparatus sothat the apparatuses can identify each other using the IP address. Whena communication apparatus is connected to the network in order to putthe apparatus into a usable state, various types of network settingsincluding IP address setting are to be performed.

Conventionally, a manager has operated an operation unit of thecommunication apparatus to input each value to be set thereto. However,in recent years, network setting for the communication apparatus can beremotely performed from an external apparatus connected thereto via thenetwork. For example, according to a method discussed in Japanese PatentApplication No. 2000-122944, a setting packet is transmitted from anetwork management apparatus to a network device, and the networksetting for the network device can be remotely performed.

More specifically, firstly, the network management apparatus transmits asearch packet to a media access control (MAC) address which meansbroadcast transmission as a destination. Upon receiving a responsepacket from the network device that has received the search packet, thenetwork management apparatus acquires the MAC address of the networkdevice from the response packet. The network management apparatustransmits each value to be set for the network device to the acquiredMAC address as a destination. The network device that has received thetransmitted value sets the each value specified by the networkmanagement apparatus to the own apparatus and completes the networksetting.

However, a following issue arises when the setting packet transmittedvia the network is received and the network setting for thecommunication apparatus is performed according to data included in thesetting packet.

Conventionally, when the network setting is remotely performed using thesetting packet, the communication apparatus subjected to setting hasanalyzed all packets (to the MAC address of the own apparatus or the MACaddress meaning the broadcast transmission) received via the network.That is because, in order to enable the network setting to be performedremotely from a state in which no IP address is set, the packet in alayer lower than that in which the IP address is treated is to bereceived and whether the received packet is the setting packet is to bedetermined.

However, once the network setting is completed, the setting packet doesnot need to be processed, and thus it is not necessary to determinewhether the packet received via the network is the setting packet.Nevertheless, for the conventional apparatus, even after the networksetting has been completed, all packets received via the network havebeen analyzed to determine whether the packets have been the settingpackets. Accordingly, due to analysis of the packets, a processing loadof the communication apparatus has been increased, thereby causing delayof other various types of processing such as drawing processing on anoperation screen, printing processing, and image conversion processing.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, an apparatus includes areception unit configured to receive a packet that is transmitted via anetwork, a setting unit configured to analyze the received packet andperform network setting for the apparatus according to data included inthe received packet, a first determination unit configured to determinewhether the received packet is a packet addressed to the apparatus, asecond determination unit configured to determine whether the receivedpacket is a setting packet for the network setting to be performed, anda control unit configured to, if the received packet is the packetaddressed to the apparatus and is not the setting packet, control thesetting unit not to analyze the packet.

Further features and aspects of the present invention will becomeapparent from the following detailed description of exemplaryembodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate exemplary embodiments, features,and aspects of the invention and, together with the description, serveto explain the principles of the invention.

FIG. 1 illustrates an entire communication system according to anexemplary embodiment of the present invention.

FIG. 2 is a block diagram illustrating a hardware configuration of aprinter according to an exemplary embodiment of the present invention.

FIG. 3 is a block diagram illustrating a software configuration of aprinter according to an exemplary embodiment of the present invention.

FIG. 4 is a sequence diagram illustrating processing for remotelyperforming network setting of a printer from a personal computer (PC)according to an exemplary embodiment of the present invention.

FIG. 5 illustrates contents of a search request according to anexemplary embodiment of the present invention.

FIG. 6 illustrates contents of a search response according to anexemplary embodiment of the present invention.

FIG. 7 is a sequence diagram illustrating processing in which anarbitrary application in a PC communicates with an application in aprinter according to an exemplary embodiment of the present invention.

FIG. 8 is a flowchart illustrating a series of processing performed by aconfigurator control unit according to an exemplary embodiment of thepresent invention.

FIG. 9 is a block diagram illustrating a software configuration of aprinter according to an exemplary embodiment of the present invention.

FIG. 10 is a sequence diagram illustrating processing for performingnetwork setting for a printer using a dynamic host configurationprotocol (DHCP) according to an exemplary embodiment of the presentinvention.

FIG. 11 is a flowchart illustrating a series of processing performed bya configurator control unit according to an exemplary embodiment of thepresent invention.

DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments, features, and aspects of the inventionwill be described in detail below with reference to the drawings.

All combinations of features illustrated in exemplary embodiments arenot necessarily essential for means to solve the issue in the invention.

FIG. 1 illustrates an entire communication system according to a firstexemplary embodiment of the present invention. A printer 101 can beconnected to a local area network (LAN) 110 and can communicate with apersonal computer (PC) 102 and a DHCP server 103 via the LAN 110. Otherexternal apparatuses (not illustrated) are connected to the LAN 110, andthe printer 101 can communicate with these external apparatuses.

FIG. 2 is a block diagram illustrating a hardware configuration of theprinter 101. A control unit 210 including a central processing unit(CPU) 211 controls an entire operation of the printer 101. The CPU 211reads a control program stored in a read only memory (ROM) 212 toperform various types of control such as reading control andtransmission control. A random access memory (RAM) 213 is used as a mainmemory of the CPU 211 and a temporary storage region of a working area.

A hard disk (HDD) 214 stores image data and various types of programs.An operation unit interface (I/F) 215 connects an operation unit 220with the control unit 210. The operation unit 220 includes a keyboardand a liquid crystal display unit having a touch panel function.

A printing unit I/F 216 connects a printing unit 230 with the controlunit 210. Image data to be printed by the printing unit 230 istransferred from the control unit 210 via the printing unit I/F 216 andprinted on a recording medium thereby.

A network I/F 217 connects the control unit 210 (the printer 101) to theLAN 110. The network I/F 217 performs communication control fortransmitting the image data and various types of information to theexternal apparatuses (including the PC 102 and the DHCP server 103) viathe LAN 110 and receiving the image data and various types ofinformation from the external apparatuses via the LAN 110. The printer101 may be a multifunction peripheral (MFP) further including a readingunit that reads an image on a document to generate the image data.

FIG. 3 is a block diagram illustrating a software configuration of theprinter 101. A packet that is transmitted from the outside via the LAN110 and received by the network I/F 217 is processed by a networkprocessing unit 310. The packet to be processed by the networkprocessing unit 310 includes a MAC address (physical address) of thenetwork I/F 217 (the printer 101) specified as a destination or a MACaddress meaning the broadcast transmission specified as a destination. Apacket other than the packets described above is discarded without beingtransferred to the network processing unit 310.

A configurator control unit 313 duplicates the packet input into thenetwork processing unit 310 and supplies the packets to each of aconfigurator 311 and a user datagram protocol (UDP)/transmission controlprotocol (TCP) processing unit 312. However, when the supply of thepacket to the configurator 311 is stopped as described below, the inputpacket is supplied (transferred) only to the UDP/TCP processing unit 312without being duplicated.

The configurator 311 analyzes the received packet to determine whetherthe received packet is a setting packet for network setting for theprinter 101 and performs the network setting for the printer 101 whenthe received packet is determined as the setting packet.

FIG. 4 is a sequence diagram illustrating processing for remotelyperforming the network setting for the printer 101 from the PC 102. Whenthe network setting is performed on the printer 101 in which no IPaddress has been set, firstly, the PC 102 performs broadcasttransmission of a search request 401 illustrated in FIG. 5.

As illustrated in FIG. 5, for a destination MAC address 501 of thesearch request 401, “ff:ff:ff:ff:ff:ff” that means the broadcasttransmission is specified. For a transmission source MAC address 502 ofthe search request 401, the MAC address allocated to the network I/F ofthe PC 102 is specified.

For a destination IP address 504 of the search request 401, “255. 255.255. 255” that means the broadcast transmission is specified. For atransmission source IP address 503 of the search request 401, the IPaddress allocated to the network I/F of the PC 102 is specified.

For a destination port 506 of the search request 401, “0*83b6” foridentifying that this packet is the setting packet for the networksetting to be performed by the configurator 311 is specified. For atransmission source port 505 of the search request 401, port informationto be used by the PC 102 is specified.

The search request 401 includes a data unit following a data linkcontrol (DLC) header, an IP header, and a UDP header. A setting request405 described below describes each value to be set for the printer 101in the data unit.

Upon receiving the search request 401, the configurator control unit 313duplicates the received search request 401 and supplies one of thesearch requests 401 to the configurator 311 and another to the UDP/TCPprocessing unit 312. FIG. 4 illustrates that the search request 402 issupplied (transferred) only to the configurator 311, however along withthe transfer of the search request 402 to the configurator 311, thesearch request 402 is also transferred to the UDP/TCP processing unit312.

Upon receiving the search request 402, the configurator 311 analyzes apart of or all of the DLC header, the IP header, the UDP header, and thedata unit of the received packet to determine the contents of thepacket. As a result, when the configurator 311 determines that thereceived packet is the search request, the configurator 311 transmits asearch response 403 in response to the search request 402. The searchresponse 403 is transferred to the PC 102 as a search response 404 viathe configurator control unit 313.

FIG. 6 illustrates the search response 404. For a destination MACaddress 601 of the search response 404, the MAC address (specified asthe transmission source MAC address 502 of the search request 401)allocated to the network I/F of the PC 102 is specified. For atransmission source MAC address 602 of the search response 404, the MACaddress allocated to the network I/F 217 of the printer 101 isspecified.

For a destination IP address 604 of the search response 404, the IPaddress allocated to the network I/F of the PC 102 is specified. For atransmission source IP address 603 of the search response 404, “0. 0. 0.0” which is set for the printer 101 as an initial value (factoryshipping value) of the IP address is specified.

For a destination port 606 of the search response 404, port informationto be used by the PC 102 is specified. For a transmission source port605 of the search response 404, “0*83b6” specified as the destinationport 506 of the search request 401 is specified.

The search response 404 includes a data unit following the DLC header,the IP header, and the UDP header.

Upon receiving the search response 404, the PC 102 transmits to theprinter 101 the setting request 405 including the data unit in whicheach value to be set for the printer 101 is described. In the settingrequest 405, the MAC address that is specified in the transmissionsource MAC address 602 of the search response 404 and allocated to thenetwork I/F 217 of the printer 101 is specified as the destination MACaddress.

Upon receiving the setting request 405, the configurator control unit313 duplicates the received setting request 405, and supplies one of thesetting requests 405 to the configurator 311 and another to the UDP/TCPprocessing unit 312. FIG. 4 illustrates that the setting request 406 issupplied (transferred) only to the configurator 311, however along withthe transfer of the setting request 406 to the configurator 311, thesetting request 406 is also transferred to the UDP/TCP processing unit312.

Upon receiving the setting request 406, the configurator 311 analyzes apart of or all of the DLC header, the IP header, the UDP header, and thedata unit of the received packet to discriminate the contents of thepacket. As a result, when the configurator 311 determines that thereceived packet is the setting request, based on each value described inthe data unit of the setting request 406, the configurator 311 performsthe network setting for the printer 101.

After the network setting is completed, the configurator 311 transmits asetting response 407 for notifying the PC 102 of the completion of thenetwork setting. The setting response 407 is transferred to the PC 102as a setting response 408 via the configurator control unit 313.

By the processing described above, the network setting can be remotelyperformed from the PC 102 on the printer 101 in which the networksetting is not performed (no IP address has been set).

FIG. 7 is a sequence diagram illustrating processing in which anarbitrary application in the PC 102 communicates with an application 320or 330 in the printer 101. In order to enable the application 320 or 330to communicate with the external apparatus on the LAN 110, the networksetting (including setting of the IP address) for the printer 101 is tobe completed.

Firstly, the PC 102 transmits a processing request 701 to the printer101. For a destination MAC address of the processing request 701, theMAC address allocated to the network I/F 217 of the printer 101 isspecified. For a transmission source MAC address of the processingrequest 701, the MAC address allocated to the network I/F of the PC 102is specified.

For a destination IP address of the processing request 701, the IPaddress set for the network I/F 217 (the printer 101) according to thesequence illustrated in FIG. 4 is specified. For a transmission sourceIP address of the processing request 701, the IP address allocated tothe network I/F of the PC 102 is specified.

For a destination port of the processing request 701, port informationfor identifying the application 320 or the application 330 is specified.For a transmission source port of the processing request 701, portinformation to be used by the PC 102 is specified.

Upon receiving the processing request 701, the configurator control unit313 duplicates the received processing request 701, and supplies one ofthe processing requests 701 to the configurator 311 and another to theUDP/TCP processing unit 312. FIG. 7 illustrates that the processingrequest 702 is supplied (transferred) only to the UDP/TCP processingunit 312, however, along with the transfer of the processing request 702to the UDP/TCP processing unit 312, the processing request 702 is alsotransferred to the configurator 311.

Upon receiving the processing request 702, the UDP/TCP processing unit312 analyzes the IP header and the UDP header of the received packet tospecify the application to be the destination to which the packet istransferred. A processing request 703 is transferred to the specifiedapplication 320 or 330.

The application 320 or 330 that has received the processing request 703performs processing and transmits a processing result as a processingresponse 704. The processing response 704 is transferred to theconfigurator control unit 313 as a processing response 705 via theUDP/TCP processing unit 312. The configurator control unit 313 that hasreceived the processing response 705 transmits a processing response 706to the PC 102.

By the processing described above, after the network setting isperformed (the IP address is set), the application 320 or 330 of theprinter 101 can communicate with the external apparatuses on the LAN110.

After the network setting for the printer 101 is completed, theconfigurator control unit 313 has no opportunities to process thesetting packet. Nevertheless, the conventional apparatus supplies(transfers) all packets received by the network processing unit 310 tothe configurator 311 after the network setting is completed.

More specifically, the configurator 311 analyzes all packets received bythe network processing unit 310, thereby generating a great load of theprinter 101 (control unit 210). The load causes delay of other varioustypes of processing (such as drawing processing on an operation screen,printing processing, and image conversion processing) performed by theprinter 101 (control unit 210).

Thus, according to the first exemplary embodiment, when the packet thatis addressed to the printer 101 and is not the setting packet for thenetwork setting to be performed by the configurator 311 is received, thesupply of the received packet to the configurator 311 is stopped.

When the packet is transmitted to the printer 101 from the externalapparatus on the LAN 110, the MAC address as the destination should beknown. However, normally, the application in the external apparatusspecifies the destination with the IP address. Thus, the externalapparatus performs broadcast transmission of an address resolutionprotocol (ARP) request, which is regulated by Request for Comments (RFC)826, to inquire the IP address specified by the application.

When the IP address specified by the ARP request corresponds to the IPaddress set for the own apparatus, the printer 101 that has received theARP request returns the MAC address of the own apparatus as a response.The external apparatus can find the MAC address of the printer 101 bythe response from the printer 101.

On the other hand, when the appropriate network setting is not performedon the printer 101, the printer 101 does not respond to the ARP request.Therefore, the external apparatus cannot acquire the MAC address of theprinter 101. In other words, when the packet (except for the settingpacket for the network setting to be performed by the configurator 311)including the MAC address of the printer 101 as the destination istransmitted, it is determined that the network setting for the printer101 has been completed.

Thus, according to the first exemplary embodiment, when the packet thatis addressed to the printer 101 and is not the setting packet for thenetwork setting to be performed by the configurator 311 is received, itis determined that the network setting has been completed. In this case,by stopping the supply of the received packet to the configurator 311,it can be set so that the configurator 311 does not analyze the packet,and thus the processing load of the printer 101 (control unit 210) canbe reduced.

FIG. 8 is a flowchart illustrating a series of processing performed bythe configurator control unit 313 to stop the supply of the packet tothe configurator 311. Each operation described in the flowchartillustrated in FIG. 8 can be realized when the CPU 211 of the printer101 executes the control program. Further, the processing in theflowchart illustrated in FIG. 8 starts when a power supply of theprinter 101 is turned on.

In step S801, it is determined whether a packet has been received. Whenthe packet has been received (YES in step S801), the processing proceedsto step S802. If not (NO in step S801), the processing waits in stepS801 until the packet is received.

In step S802, whether to supply the packet to the configurator 311 isdetermined by determining whether a supply flag is set to ON or OFF.After the power supply of the printer 101 is turned on, since the supplyof the packet to the configurator 311 is not stopped, the supply flag isset to ON. However, in step S807 that will be described below, when thesupply of the packet to the configurator 311 is stopped, the supply flagis set to OFF.

If the supply of the packet to the configurator 311 is stopped in stepS807, when the power supply of the printer 101 is once turned off andthen turned on again, the supply flag is returned to the ON state.Therefore, by turning on the power supply of the printer 101 again, thesupply of the packet to the configurator 311 can be resumed. With thisarrangement, the network setting using the configurator 311 can bechanged.

As a result of the determination in step S802, if it is determined thatthe packet is to be supplied to the configurator 311 (YES in step S802),the processing proceeds to step S803. On the other hand, if it isdetermined that the packet is not to be supplied to the configurator 311(NO in step S802), the processing proceeds to step S808 and the receivedpacket is supplied (transferred) only to the UDP/TCP processing unit312. In this case, the supply (transfer) of the packet to theconfigurator 311 is not performed.

In step S803, the received packet is duplicated. In the following stepS804, it is determined whether the received packet is addressed to theown apparatus (printer 101). When the destination MAC address of thereceived packet corresponds to the MAC address allocated to the networkI/F 217 of the printer 101, it is determined that the received packet isaddressed to the own apparatus (YES in step S804). On the other hand,when the destination MAC address means the broadcast transmission, it isdetermined that the received packet is not addressed to the ownapparatus (NO in step S804).

As a result of the determination in step S804, if it is determined thatthe received packet is not addressed to the own apparatus (NO in stepS804), then in step S806, the received packet is supplied (transferred)to the configurator 311, and in step S808, the received packet isfurther supplied (transferred) to the UDP/TCP processing unit 312.

As a result of the determination in step S804, if it is determined thatthe received packet is addressed to the own apparatus (YES in stepS804), the processing proceeds to step S805. In step S805, it isdetermined whether the received packet is the setting packet (e.g., thesetting request 405) for the network setting to be performed by theconfigurator 311. The configurator control unit 313 previously stores“0*83b6” that is identification information (port information) foridentifying the setting packet. When it is determined that the portinformation included in the received packet corresponds to “0*83b6” thatis stored in the configurator control unit 313, it is determined thatthe received packet is the setting packet.

As a result of the determination in step S805, if it is determined thatthe received packet is the setting packet (YES in step S805), then instep S806, the received packet is supplied (transferred) to theconfigurator 311, and in step S808, the received packet is furthersupplied (transferred) to the UDP/TCP processing unit 312.

As a result of the determination in step S805, if it is determined thatthe received packet is not the setting packet (NO in step S805), theprocessing proceeds to step S807 and the supply flag is set to OFF.Accordingly, the supply (transfer) of the received packet to theconfigurator 311 is stopped. The processing, then, proceeds to step S808and supplies (transfers) the received packet only to the UDP/TCPprocessing unit 312. In this case, since the supply (transfer) of thepacket to the configurator 311 is not performed, the duplicated packetis discarded.

By the processing described above, it can be set so that theconfigurator 311 does not analyze the received packet, when it isdetermined that the network setting has been completed. With thisarrangement, the processing load of the printer 101 (control unit 210)can be reduced.

Next, a second exemplary embodiment of the present invention will bedescribed. The printer 101 that will be described in the secondexemplary embodiment can perform not only the network setting by theconfigurator 311 but also the network setting using a dynamic hostconfiguration protocol (DHCP).

When the network setting is performed using the DHCP, the printer 101communicates with an external server (a DHCP server 103). When a DHCPacknowledgment (ACK) included in a command group used by the DHCP isreceived, it is determined that the network setting for the printer 101has been completed (actually, just about to be completed), and thesupply of the packet to the configurator 311 is stopped. In the presentexemplary embodiment, the same numeral reference is given to theconfiguration similar to that in the first exemplary embodimentdescribed above, and detailed description thereof will not be repeated.

FIG. 9 illustrates a software configuration of the printer 101. Comparedwith the software configuration illustrated in FIG. 3, a DHCP processingunit 901 is newly provided in the present exemplary embodiment. The DHCPprocessing unit 901 performs the network setting for the printer 101using the DHCP that is different from the protocol used by theconfigurator 311.

FIG. 10 is a sequence diagram illustrating processing for performingnetwork setting for the printer 101 using the DHCP.

Firstly, the DHCP processing unit 901 transmits a DHCP DISCOVER 1001 tothe UDP/TCP processing unit 312. The UDP/TCP processing unit 312transfers the received DHCP DISCOVER 1001 to the configurator controlunit 313 as a DHCP DISCOVER 1002. The configurator control unit 313performs broadcast transmission of the received DHCP DISCOVER 1002 tothe LAN 110 as a DHCP DISCOVER 1003.

Upon receiving the DHCP DISCOVER 1003, the DHCP 103 transmits a DHCPOFFER 1004 which describes a candidate of a value (IP address) that canbe set to the printer 101 as a response.

The configurator control unit 313 that has received the DHCP OFFER 1004duplicates the received DHCP OFFER 1004, and supplies one of the DHCPOFFERs 1004 to the configurator 311 and another to the UDP/TCPprocessing unit 312. FIG. 10 only illustrates that a DHCP OFFER 1005 issupplied (transferred) to the UDP/TCP processing unit 312. However,along with the transfer of the DHCP OFFER 1005 to the UDP/TCP processingunit 312, the DHCP OFFER 1005 is also transferred to the configurator311.

The UDP/TCP processing unit 312 transfers the received DHCP OFFER 1005to the DHCP processing unit 901 as a DHCP OFFER 1006. If candidatesincluded in the DHCP OFFER 1006 include a value that has been used inthe past, the value is selected. If the candidates do not include thevalue that has been used in the past, an arbitrary value is selectedaccording to a predetermined condition.

In order to notify the DHCP server 103 of the selected value, a DHCPREQUEST 1007 is transmitted to the UDP/TCP processing unit 312. TheUDP/TCP processing unit 312 transfers the received DHCP REQUEST 1007 tothe configurator control unit 313 as a DHCP REQUEST 1008. Theconfigurator control unit 313 performs broadcast transmission of thereceived DHCP REQUEST 1008 to the LAN 110 as a DHCP REQUEST 1009.

The DHCP server 103 that has received the DHCP REQUEST 1009 checks thevalue selected by the DHCP processing unit 901 and transmits a DHCP ACK1010 to the printer 101 as a response.

The configurator control unit 313 that has received the DHCP ACK 1010transfers a DHCP ACK 1011 to the UDP/TCP processing unit 312.

The UDP/TCP processing unit 312 transfers the received DHCP ACK 1011 tothe DHCP processing unit 901 as a DHCP ACK 1012. After checking the DHCPACK 1012, the DHCP processing unit 901 performs the network setting forthe own apparatus based on the selected value, and ends the processing.

By the processing described above, the network setting for the printer101 can be performed using the DHCP.

FIG. 11 is a flowchart illustrating a series of processing performed bythe configurator control unit 313 to stop the supply of the packet tothe configurator 311. Each operation described in the flowchartillustrated in FIG. 11 can be realized when the CPU 211 of the printer101 executes the control program. In the flowchart illustrated in FIG.11, in place of steps S804 and S805 in the flowchart illustrated in FIG.8, processing in step S1011 is added.

In step S801, it is determined whether a packet has been received. Whenthe packet has been received (YES in step S801), the processing proceedsto step S802. If not (NO in step S801), the processing waits in stepS801 until the packet is received.

In step S802, whether to supply the packet to the configurator 311 isdetermined by determining whether a supply flag is set to ON or OFF.After the power supply of the printer 101 is turned on, since the supplyof the packet to the configurator 311 is not stopped, the supply flag isset to ON. However, in step S807 that will be described below, when thesupply of the packet to the configurator 311 is stopped, the supply flagis set to OFF.

If the supply of the packet to the configurator 311 is stopped in stepS807, when the power supply of the printer 101 is once turned off andthen turned on again, the supply flag is returned to the ON state.Therefore, by turning on the power supply of the printer 101 again, thesupply of the packet to the configurator 311 can be resumed. With thisarrangement, the network setting using the configurator 311 can bechanged.

As a result of the determination in step S802, if it is determined thatthe packet is to be supplied to the configurator 311 (YES in step S802),the processing proceeds to step S803. On the other hand, if it isdetermined that the packet is not to be supplied to the configurator 311(NO in step S802), the processing proceeds to step S808 and the receivedpacket is supplied (transferred) only to the UDP/TCP processing unit312. In this case, the supply (transfer) of the packet to theconfigurator 311 is not performed.

In step S803, the received packet is duplicated. In the following stepS1101, it is determined whether the received packet is the DHCP ACKincluded in the packet group which is transmitted or received via theDHCP. As a result of the determination, if it is determined that thereceived packet is not the DHCP ACK (NO in step S1101), then in stepS806, the received packet is supplied (transferred) to the configurator311, and in step S808, the received packet is further supplied(transferred) to the UDP/TCP processing unit 312.

As a result of the determination in step S1101, if it is determined thatthe received packet is the DHCP ACK (YES in step S1101), the processingproceeds to step S807 and the supply flag is set to OFF. Accordingly,the supply (transfer) of the received packet to the configurator 311 isstopped. The processing, then, proceeds to step S808 and supplies(transfers) the received packet only to the UDP/TCP processing unit 312.In this case, since the supply (transfer) of the packet to theconfigurator 311 is not performed, the duplicated packet is discarded.

By the processing described above, it can be set so that theconfigurator 311 does not analyze the received packet, when it isdetermined that the network setting has been completed. With thisarrangement, the processing load of the printer 101 (control unit 210)can be reduced.

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment (s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment (s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all modifications, equivalent structures, and functions.

This application claims priority from Japanese Patent Application No.2010-068287 filed Mar. 24, 2010, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus comprising: a receptionunit configured to receive a packet transmitted from an externalapparatus on a network; a setting unit configured to set an IP addressof the communication apparatus, based on a setting packet received bythe reception unit; and a controlling unit configured to maintain thesetting unit in an enable state until the reception unit receives apredetermined packet, a type of which is different from a type of thesetting packet, and put the setting unit into a disable state oncondition that the reception unit receives the predetermined packet,wherein the setting unit sets the IP address of the communicationapparatus based on the setting packet received by the reception unitwhile the controlling unit maintains the setting unit in the enablestate, and wherein the setting unit does not set the IP address of thecommunication apparatus, after the controlling unit puts the settingunit into the disable state, even if the reception unit receives thesetting packet.
 2. A communication method comprising: receiving a packettransmitted from an external apparatus on a network; setting IP addressof a communication apparatus, based on the received setting packet; andcontrolling to maintain the setting in an enable state until thereceiving receives a predetermined packet, a type of which is differentfrom a type of the setting packet, and putting the setting into adisable state on condition that the receiving receives the predeterminedpacket, wherein the setting sets the IP address of the communicationapparatus based on the setting packet received while the controllingmaintains the setting in the enable state, and wherein the setting doesnot set the IP address of the communication apparatus, after thecontrolling puts the setting into the disable state, even if thereceiving receives the setting packet.
 3. A non-transitory computerreadable medium for storing a computer-executable program ofinstructions for causing a computer to perform a communication methodcomprising: receiving a packet transmitted from an external apparatus ona network; setting an IP address of a communication apparatus, based onthe received setting packet; and controlling to maintain the setting inan enable state until the receiving receives a predetermined packet, atype of which is different from a type of the setting packet, and putthe setting into a disable state on condition that the receivingreceives the predetermined packet, wherein the setting sets the IPaddress of the communication apparatus based on the setting packetreceived while the controlling maintains the setting in the enablestate, and wherein the setting does not set the IP address of thecommunication apparatus, after the controlling puts the setting into thedisable state, even if the receiving receives the setting packet.
 4. Thecommunication apparatus according to claim 1, further comprising: asupply unit configured to supply the setting packet received by thereception unit to the setting unit according to a supply flag, whereinthe supply flag is in an ON state in the enable state of the settingunit, and the supply flag is in an OFF state in the disable state of thesetting unit.
 5. The communication apparatus according to claim 1,wherein the communication apparatus is a printing apparatus capable ofperforming printing processing.
 6. The communication apparatus accordingto claim 1, wherein the controlling unit determines whether or not apacket received by the reception unit is the setting packet, based onidentification information included in the packet received by thereception unit.
 7. The communication apparatus according to claim 6,wherein the identification information is port information, and wherein,in a case where the port information indicates a specific port, thecontrolling unit determines that the packet received by the receptionunit is the setting packet.
 8. The communication apparatus according toclaim 1, wherein the controlling unit returns the setting unit from thedisable state to the enable state if the communication apparatus isturned on again.
 9. A communication apparatus comprising: a receptionunit configured to receive a packet transmitted from an externalapparatus on a network; a setting unit configured to set an IP addressof the communication apparatus, based on a setting packet received bythe reception unit; and a controlling unit configured to, in a casewhere the reception unit receives a packet of which a destination MACaddress corresponds to a MAC address of the communication apparatus andis different from the setting packet, change a state of thecommunication apparatus from an enable state in which the setting unitsets the IP address of the communication apparatus to a disable state inwhich the setting unit does not set the IP address of the communicationapparatus, wherein in a case where the communication apparatus is in theenable state, the setting unit sets the IP address of the communicationapparatus based on the setting packet received by the reception unit,and wherein in a case where the communication apparatus is in thedisable state, even if the reception unit receives the setting packet,the setting unit does not set the IP address of the communicationapparatus based on the setting packet received by the reception unit.10. The communication apparatus according to claim 9, furthercomprising: a supply unit configured to supply the setting packetreceived by the reception unit to the setting unit, wherein in a casewhere the communication apparatus is in the enable state, the supplyunit supplies the setting packet to the setting unit, and in a casewhere the communication apparatus is in the disable state, the supplyunit does not supply the setting packet to the setting unit.
 11. Thecommunication apparatus according to claim 9, wherein the communicationapparatus is a printing apparatus capable of performing printingprocessing.
 12. The communication apparatus according to claim 9,wherein in a case where the communication apparatus restarts, thecontrolling unit sets the communication apparatus such that thecommunication apparatus is put in the enable state.
 13. A communicationmethod of a communication apparatus comprising: receiving a packettransmitted from an external apparatus on a network; setting an IPaddress of the communication apparatus, based on a setting packetreceived by the receiving; and changing, in a case where the receivingreceives a packet of which a destination MAC address corresponds to aMAC address of the communication apparatus and is different from thesetting packet, a state of the communication apparatus from an enablestate in which the setting sets the IP address of the communicationapparatus to a disable state in which the setting does not set the IPaddress of the communication apparatus, wherein in a case where thecommunication apparatus is in the enable state, the setting sets the IPaddress of the communication apparatus based on the received settingpacket, and wherein in a case where the communication apparatus is inthe disable state, even if the receiving receives the setting packet,the setting does not set the IP address of the communication apparatusbased on the received setting packet.
 14. A non-transitory computerreadable medium for storing a computer-executable program ofinstructions for causing a computer to perform a communication method ofa communication apparatus comprising: receiving a packet transmittedfrom an external apparatus on a network; setting an IP address of thecommunication apparatus, based on a setting packet received by thereceiving; and changing, in a case where the receiving receives a packetof which a destination MAC address corresponds to a MAC address of thecommunication apparatus and is different from the setting packet, astate of the communication apparatus from an enable state in which thesetting sets the IP address of the communication apparatus to a disablestate in which the setting does not set the IP address of thecommunication apparatus, wherein in a case where the communicationapparatus is in the enable state, the setting sets the IP address of thecommunication apparatus based on the received setting packet, andwherein in a case where the communication apparatus is in the disablestate, even if the receiving receives the setting packet, the settingdoes not set the IP address of the communication apparatus based on thereceived setting packet.